import 'package:flutter/material.dart';

class MediaQueryExps extends StatelessWidget {
  const MediaQueryExps({super.key});

  @override
  Widget build(BuildContext context) {
    final screenWidth = MediaQuery.of(context).size.width;
    final screenHeight = MediaQuery.of(context).size.height;
    final isLandscape =
        MediaQuery.of(context).orientation == Orientation.landscape;
    final devicePixelRatio = MediaQuery.of(context).devicePixelRatio;

    return Scaffold(
      body: SafeArea(
        child: Center(
            child: Column(
          children: [
            Text('screen width: ${screenWidth.toStringAsFixed(1)}'),
            Text('screen height: ${screenHeight.toStringAsFixed(1)}'),
            Text('orientation: ${isLandscape ? 'landscape' : 'portrait'}'),
            Text('devicePixelRatio: $devicePixelRatio'),
          ],
        )),
      ),
    );
  }
}
